import Request from '@/request/index'

const juheapi = {
  /*
   * 聚合数据相关
   */
  getPolicy(from, to) {
    let appKey = '7cb82bcde332836f6c488d259ad90787'
    return Request.get(
      //   'https://apis.juhe.cn/springTravel/current?key=' +
      '/api/query?key=' + appKey + '&from=' + from + '&to=' + to
    )
  },
  getCurrentPolicy(from) {
    let appKey = '7cb82bcde332836f6c488d259ad90787'
    return Request.get('/api/current?key=' + appKey + '&from=' + from)
  },

  getCurrentOrganization() {
    let appKey = '7cb82bcde332836f6c488d259ad90787'
    return Request.get('/api/currentHsjg?key=' + appKey)
  },

  getOrganization(city_id) {
    let appKey = '7cb82bcde332836f6c488d259ad90787'
    return Request.get('/api/hsjg?key=' + appKey + '&city_id=' + city_id)
  }
}

export default juheapi
